﻿namespace LogicStudio.Framework.UI.Utilidades
{
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;

    public class EntityValidationResult
    {
        public IList<ValidationResult> Violations { get; private set; }
        public bool HasViolations
        {
            get { return Violations.Count > 0; }
        }

        public EntityValidationResult(IList<ValidationResult> violations = null)
        {
            Violations = violations ?? new List<ValidationResult>();
        }
    }
}